<?php

$this->useClass('Uniform_Factory_Abstract');

class Uniform_Factory_Object extends Uniform_Factory_Abstract
{
	public function getUniform ($what, $type=NULL)
	{
		if (is_scalar($what)) $what = $this->service->getStore()->getObject($what);
		if (!$type) $type = ucfirst(substr($what->type, 1));

		$class = "{$this->ns}{$type}";
		if ($this->service->useClass($class)) {
			$o = new $class($this->service, $what);
		} else {
			$o = false;
		}
		return $o;
	} // end of method getUniform

}

